<template>
  <div class="q-pa-md">
    <div class="q-gutter-sm">
      <t-list>
        <!--
        Rendering a <label> tag (notice tag="label")
        so QCheckboxes will respond to clicks on QItems to
        change Toggle state.
      -->

        <t-item tag="label" v-ripple>
          <t-item-section avatar>
            <t-checkbox v-model="color" val="teal" color="teal" />
          </t-item-section>
          <t-item-section>
            <t-item-label>Teal</t-item-label>
          </t-item-section>
        </t-item>

        <t-item tag="label" v-ripple>
          <t-item-section avatar>
            <t-checkbox v-model="color" val="orange" color="orange" />
          </t-item-section>
          <t-item-section>
            <t-item-label>Orange</t-item-label>
            <t-item-label caption>With description</t-item-label>
          </t-item-section>
        </t-item>

        <t-item tag="label" v-ripple>
          <t-item-section avatar top>
            <t-checkbox v-model="color" val="cyan" color="cyan" />
          </t-item-section>
          <t-item-section>
            <t-item-label>Cyan</t-item-label>
            <t-item-label caption>
              Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
              eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
              enim ad minim veniam, quis nostrud exercitation ullamco laboris
              nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
              reprehenderit in voluptate velit esse cillum dolore eu fugiat
              nulla pariatur. Excepteur sint occaecat cupidatat non proident,
              sunt in culpa qui officia deserunt mollit anim id est laborum.
            </t-item-label>
          </t-item-section>
        </t-item>
      </t-list>
    </div>

    <div class="q-px-sm q-mt-sm">
      Your selection is: <strong>{{ color }}</strong>
    </div>
  </div>
</template>

<script>
  import { ref } from 'vue';

  export default {
    setup() {
      return {
        color: ref(['cyan']),
      };
    },
  };
</script>
